<?php
declare (strict_types=1);

namespace app\model;

use think\Model;

/**
 * @mixin think\Model
 */
class Manager extends Model
{
    protected $pk = 'id';

    public function role(){
        return $this->belongsTo('Role');
    }

    //密码hash修改器
    public function setPasswordAttr($value, $data)
    {
        return password_hash($value, PASSWORD_DEFAULT);
    }
}
